package com.crtf.hello.kotlin.basic.syntax

import org.junit.jupiter.api.Test

class BasicSyntaxTest {

    @Test
    fun sum() {
        BasicSyntax().sum(1, 2)
    }

    @Test
    fun definingLocalVariables() {
        BasicSyntax().definingLocalVariables()
    }

    @Test
    fun optionalFields() {
        BasicSyntax().optionalFields(Unit)
    }

    @Test
    fun classItemManager() {
        var itemManager1: BasicSyntax.ItemManager = BasicSyntax.ItemManager("cat_id", "db://connection")
        var itemManager2 = BasicSyntax.ItemManager(categoryId = "cat_id", dbConnection = "db://connection")
        var itemManager3 = BasicSyntax.ItemManager("cat_id", "db://connection", "foo@bar.com")
        itemManager1.isFromSpecificCategory("cat_id")
    }
}